package com.xuecheng.manage_media.config;

import org.springframework.amqp.core.Exchange;
import org.springframework.amqp.core.ExchangeBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitmqConfig {
    //指定交换机
        public static final String EX_MEDIA_PROCESSTASK="ex_media_processor";
    //指定routingKey
    @Value("${xc-service-manage-media.mq.routingkey-media-video}")
    String routingkey_media_video;
    //配置交换机
    @Bean("EX_MEDIA_PROCESSTASK")
    public Exchange EX_MEDIA_PROCESSTASK(){
        return ExchangeBuilder.directExchange(EX_MEDIA_PROCESSTASK).durable(true).build();
    }

}
